<%--
  Created by IntelliJ IDEA.
  User: zhuchao
  Date: 2017/5/8
  Time: 17:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Pages</title>
    <link href="../../assets/css/update-download.css" rel="stylesheet" />
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar bar1"></span>
                <span class="icon-bar bar2"></span>
                <span class="icon-bar bar3"></span>
            </button>
            <a class="navbar-brand" href="#">修改信息</a>
        </div>
        <div class="collapse navbar-collapse">

            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="ti-user"></i>

                        <p>您好！${sessionScope.user.name}</p>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">修改信息</a></li>
                        <li><a href="#">退出登录 </a></li>

                    </ul>
                </li>

            </ul>

        </div>
    </div>
</nav>
<div class="content">

    <div class="text">上传论文</div>
    <form enctype="multipart/form-data" action="/student/upload" method="post">
    <div  class="update"><input type="file" accept="application/msword" name="page" onchange="change(this.value)">
        <div>浏览文件</div>
    </div>
    <div ><input type="text" name="page_name" id="file"class="textField"></div>
    <div><input type="submit" value="提交" class="button"></div>
    </form>
</div>
</body>
<script type="text/javascript">
    function change(value) {

        var s =value.substring(value.lastIndexOf("\\")+1,value.length);

        $('#file').val(s);
    }
</script>
</html>
